﻿using Spider.Entitys;
using Spider.Rules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spider.Analyse
{

    public interface IAnalyse
    {
        /// <summary>
        /// 返回解析的结果集
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="html"></param>
        /// <param name="rule"></param>
        /// <returns></returns>
        List<T> AnalyseStart<T>(string html, IRule rule, object o = null)
             where T : class, new();


        /// <summary>
        /// 解析HTML
        /// </summary>
        /// <param name="html"></param>
        /// <param name="rule"></param>
        /// <param name="o"></param>
        /// <returns></returns>
        string AnalyseHtml(string html, string rule, object o = null);
    }
}
